package cn.shengchao.wecom.utils;

import cn.shengchao.examstar.rpc.wecom.api.WeComSyncToLocalApi;
import cn.shengchao.examstar.rpc.wecom.dto.ExternalContactUserDto;
import cn.shengchao.examstar.rpc.wecom.dto.WeComCpUserDto;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @program: examstarapi
 * @description: 本地代理处置
 * @author: Xiong weiqiang
 * @create: 2025-04-10 15:10
 */
@Component
public class LocalApiProxy {
    @DubboReference
    private WeComSyncToLocalApi weComSyncToLocalApi;

    public void syncUploadLocal(WeComCpUserDto weComCpUserDto){
        weComSyncToLocalApi.syncUserInfoToLocal(weComCpUserDto);
    }

    public void syncLocalUserFollows( List<String> followUserIds) {
        weComSyncToLocalApi.syncLocalUserFollows(followUserIds);
    }

    public void syncLocalUserCustomers(String userId, List<String> customers) {
        weComSyncToLocalApi.syncLocalUserCustomers(userId,customers);
    }

    public void syncExternalUserCustomerDetail(ExternalContactUserDto externalContactUserDto) {
        weComSyncToLocalApi.syncExternalUserCustomerDetail(externalContactUserDto);
    }
}